
include std/unittest.e
include qt/qtSql.e
include qt/core.e as qt
include qt/qtUtils.e  as qu



-- TEST_QUIET (so no output), TEST_SHOW_FAILED_ONLY and TEST_SHOW_ALL
set_test_verbosity(TEST_SHOW_ALL)



global object _ = 0

object void =  qt:init(,QApplication_Tty)

atom
    se = settings("settings.ini", QSettings_IniFormat),
    $

 qu:setValue(se, "hey", "whatever")


test_equal("hey val=w ",  "whatever", qu:value(se, "hey") )
 qu:setValue(se, "hey", "whatever2")
test_equal("hey val=2 ",  "whatever2", qu:value(se, "hey") )
 qu:setValue(se, "hey", "")
test_equal("hey val= ",  "", qu:value(se, "hey") )

beginGroup(se, "general2")
 qu:setValue(se, "hey", "222")
endGroup(se)
test_not_equal("hey val= ",  "222", qu:value(se, "hey") )
test_equal("hey val= ",  "", qu:value(se, "hey") )

beginGroup(se, "general2")
test_equal("hey val= ",  "222", qu:value(se, "hey") )
endGroup(se)

test_report()
